Previous Book Contents Book Index Next

Inside Macintosh: /
QuickDraw 3D RAVE / QuickDraw 3D RAVE Reference
QuickDraw 3D RAVE Routines / Color Lookup Table Methods


TQAColorTableNew

A drawing engine may define a method to create a new color lookup table. This method is optional and must be supported only by drawing engines that support color lookup tables.

typedef TQAError (*TQAColorTableNew) (
                                      TQAColorTableType pixelType, 
                                      void *pixelData, 
                                      long transparentIndex, 
                                      TQAColorTable **newTable);
pixelType
The type of the new color lookup table. See "Color Lookup Table Types" (page 1-37) for information on the available color lookup table types.
pixelData
A pointer to the color lookup table entries.
transparentIndexFlag
A long integer, interpreted as a Boolean value, that indicates whether the color lookup table entry at index 0 is completely transparent (TRUE) or not (FALSE).
newTable
On entry, the address of a pointer variable. On exit, set that variable to point to a new color lookup table. If a new color lookup table cannot be created, set *newTable to the value NULL.
DESCRIPTION
Your TQAColorTableNew function is called whenever an application calls QAColorTableNew. Your function should return, in the buffer pointed to by the newTable parameter, a pointer to a new color lookup table of the type specified by the pixelType parameter. The color table data is passed to your function in the pixelData parameter. Your method should copy that data so that the caller can dispose of the memory it occupies.

IMPORTANT
Currently, QuickDraw 3D RAVE supports only 32-bit RGB color lookup table entries. Your drawing engine might reduce the size of individual color lookup table entries to fit into its on-board memory.
SPECIAL CONSIDERATIONS
Not all drawing engines need to support color lookup tables, but QuickDraw 3D RAVE does not provide color lookup table emulation for engines that do not support them.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
28 AUG 1996